<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class StockController extends Controller
{

	public function getIndex()
	{
		$info = DB::table('goods')
						->where('GoodsNumber','<',50)
						->get();
		// dd($info);	
		return view('Lzk.Stock.Stock',['info'=>$info]);
	} 

	public function getDel($id)
	{
		// echo $id;
		$res = DB::table('goods')->where('id',$id)->delete($id);
		if($res){
			return redirect('/Lzk/stock/index');
		}else{
			return back();
		}
	}
}
